package com.sptus.web.mapper.master;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sptus.system.domain.DevInfoMsg1History;
import com.sptus.system.domain.DeviceModel;
import com.sptus.system.domain.Equipment;
import com.sptus.system.domain.model.DevModel;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * @Description: equipment
 * @Author: jeecg-boot
 * @Date:   2024-09-25
 * @Version: V1.0
 */
public interface CloudEquipmentMapper extends BaseMapper<Equipment> {

    HashMap<String, String> getEquipmentCity(@Param("sn") String sn);

    ArrayList<HashMap<String, String>> getDevClassify(DevModel devModel);

    ArrayList<HashMap<String, String>> getHomeHead(DevModel devModel);

    ArrayList<HashMap<String, String>> getDevDayGeneration(DevModel devModel);

    HashMap<String, Object> getDevHealth(DevModel devModel);

    ArrayList<HashMap<String, String>> getDevMonthGeneration(DevModel devModel);

    ArrayList<HashMap<String, String>> getDevYearGeneration(DevModel devModel);

    ArrayList<HashMap<String, Object>> getDevHealthFloat(DevModel devModel);

    ArrayList<HashMap<String, Object>> getDevAlarmList(DevModel devModel);

    ArrayList<HashMap<String, Object>> getEquipmentGenration();

    void saveGapacity(@Param("devBG") HashMap<String, Object> devBG);

    HashMap<String, Object> getHomeHealth(@Param("num") String number);

    void saveHomeHealth(@Param("devBG") HashMap<String, Object> devBG);

    ArrayList<HashMap<String, Object>> selectListPage(@Param("deviceModel") DeviceModel deviceModel);



    int  selectListCount(@Param("deviceModel") DeviceModel deviceModel);

    ArrayList<HashMap<String, Object>> getDevTypeNum();

    ArrayList<HashMap<String, String>> getDevMap(String number);

    IPage<HashMap<String, Object>> getHistoryDataSetInfoPage(Page<DevInfoMsg1History> page, @Param(Constants.WRAPPER) QueryWrapper<DevInfoMsg1History> queryWrapper);

    HashMap<String, Object> getDeviceUpgrade(@Param("deviceModel")DeviceModel deviceModel);

    HashMap<String, Object> getDeviceState(@Param("deviceModel")DeviceModel deviceModel);

    List<Equipment> selectListInfo( @Param(Constants.WRAPPER) QueryWrapper<Equipment> equipmentLambdaQueryWrapper);
}
